package com.jg.poiet.data;

import java.util.List;
import java.util.Map;

/**
 * 模板列数据
 */
public class TemplateListRenderData implements RenderData {

    /**
     * 扩展行数
     */
    private int row;
    /**
     * 扩展列数
     */
    private int column;

    private List<Map<String, CellRenderData>> listData;

    /**
     * 列表方向（默认垂直）
     */
    private DIRECTION direction = DIRECTION.VERTICAL;

    /**
     * 列表方向枚举
     */
    public enum DIRECTION {
        HORIZONTAL,VERTICAL
    }

    public TemplateListRenderData(int row, int column, List<Map<String, CellRenderData>> listData) {
        this.row = row;
        this.column = column;
        this.listData = listData;
    }

    public TemplateListRenderData(int row, int column, List<Map<String, CellRenderData>> listData, DIRECTION direction) {
        this(row, column, listData);
        this.direction = direction;
    }

    public TemplateListRenderData buildDirection(DIRECTION direction) {
        this.direction = direction;
        return this;
    }

    public DIRECTION getDirection() {
        return direction;
    }

    public void setDirection(DIRECTION direction) {
        this.direction = direction;
    }

    public int getRow() {
        return row;
    }

    public void setRow(int row) {
        this.row = row;
    }

    public int getColumn() {
        return column;
    }

    public void setColumn(int column) {
        this.column = column;
    }

    public List<Map<String, CellRenderData>> getListData() {
        return listData;
    }

    public void setListData(List<Map<String, CellRenderData>> listData) {
        this.listData = listData;
    }
}
